#ifndef THREADGETDESKTOPICON_H
#define THREADGETDESKTOPICON_H

#include "data/desktop_icon.h"

#include <QThread>
#include <QMap>
#include <QFileInfo>

class ThreadGetDesktopIcon : public QThread
{
    Q_OBJECT
public:
    explicit ThreadGetDesktopIcon(QObject *parent = nullptr);
    ~ThreadGetDesktopIcon();

    void SetParam();

    QList<DesktopIcon> GetResult();

private:
    void run();

    void GetIcon(const QFileInfo& info, QString file_path, QImage& img);

private:
    QList<DesktopIcon> result_list_;
    QMap<QString,QString> const_icon_map_;

};

#endif // THREADGETDESKTOPICON_H
